-
Notifications
You must be signed in to change notification settings - Fork 804
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mutate relevant compilation variables into config #1256
Mutate relevant compilation variables into config #1256
Conversation
Move var definitions next to compilation var definitions
Replace #ifdef MQTTDecodeTopic by #if UseExtDecoder
Create a default config for BTConfig_s (BTConfig_default) based on defines Create a global variable (BTConfig) to hold live BT configuration data and initialize it Move bleConnect to BTConfig
Always declare AttemptBLEConnect & BLE_FILTER_CONNECTABLE
Mutate pubUnknownBLEServiceData as runtime var in BTConfig Mutate pubBLEManufacturerData as runtime var in BTConfig Mutate pubUnknownBLEManufacturerData as runtime var in BTConfig Mutate pubBLEServiceUUID as runtime var in BTConfig
Mutate useBeaconUuidForPresence as runtime var in BTConfig
Lint issues are regarding |
Hello @BadWolf42 , I formatted it. |
Ok, got it, thanks. |
Give me a few days to test it and I will review it |
Hello @BadWolf42 , LGTM, thanks |
Thank you, I'll continue asap on the next step |
Hello Team,
Description:
As per issue #1240, this PR removes major non-hardware dependent compilation variables from ZgatewayBT.ino.
To achieve this, the following changes have been made:
minRssi
in config_BT.h,bleConnect
,BLEscanBeforeConnect
,BLEinterval
,PublishOnlySensors
,hassPresence
,minRssi
into struct BTConfig_s,presenceTopic
into BTConfig_s,MQTTDecodeTopic
asextDecoderTopic
into BTConfig_s,UseExtDecoder
,BLE_FILTER_CONNECTABLE
,pubKnownBLEServiceData
,pubUnknownBLEServiceData
,pubBLEManufacturerData
,pubUnknownBLEManufacturerData
,pubBLEServiceUUID
,useBeaconUuidForTopic
, `useBeaconUuidForPresence as runtime var into BTConfig_sAlso compilation variable
AttemptBLECOnnect
has been renamedAttemptBLEConnect
, which could be A BREAKING CHANGE.And compilation variable
ServicedataMinLength
has been removed (unused).The next steps are:
MQTTtoBT
topic,Tell me if this is going the right way for you.
Bad
Checklist: